<!DOCTYPE html>
<html>
<head>	
	<title>{:C('SERVER_HOME_NAME')}</title>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/css/style.css" />			
</head>
<body>
	<div class="box">
		<include file="Public/top" />
		<div class="content">
			<include file="leftNav" />
			<div class="main p30">
				<form action="__URL__/pushServiceForm" method="post" onSubmit="return beforeSubmit(this);" enctype="multipart/form-data">
					<div class="form-group">套餐：</div>
					<div class="form-group tbs-btn pushPackage">
					<volist id="vo" name="pushPackage">
						<span data-val="{$vo.id}" data-money="{$vo.money}">{$vo.title|default='--'}</span>
					</volist>
	                <input type="hidden" name="pushPackage">
					</div>
					<div class="form-group">金额：
					<span class="text-red" id="money">0</span>（元）
					<input type="hidden" name="money" value="0" />
					</div>
					<div class="form-group">推送图片：</div>					
					<div class="form-group" style="color:red;">温馨提示：请上传适当图片，大小不要超过1MB</div>
					<div class="form-group">
						<div class="photos-upLoad">
					        <div class="photoItem">
						        <div class="icon"></div>
						        <a href="javascript:void(0)" class="add">上传图片</a>
						        <input type="file" name="img_upload[]"/>
					        </div>
					        <div class="clear"></div>
					    </div>
					</div>
					<div class="form-group">推送文案：</div>
					<div><textarea class="push-content" name="content"></textarea></div>								              
					<div class="btn-form">
						<input type="submit" class="btn" value="保存">
					</div>	
				</form>	
			
		</div>
	</div>
	
	<include file="Public/ok" />

	<script type="text/javascript" src="__PUBLIC__/js/jquery-1.7.min.js"></script>
	<script src="__PUBLIC__/js/page.js"></script>
	<script src="__PUBLIC__/js/detailRoll.js"></script>
	<script type="text/javascript">
	
			$(function () {
				
				//套餐选择
				$(".pushPackage span").on("click",function () {
					$(this).addClass("cur");
					$(this).siblings().removeClass("cur");
					var val=$(this).attr("data-val");
					$("input[name=pushPackage]").val(val);

					var money=$(this).attr("data-money");
					$("input[name=money]").val(money);
					$("#money").text(money);

				});
		
			});

				//提交表单
				function beforeSubmit(form){

					if(form.pushPackage.value==''){
						prompting('请选择分类！');
						return false;
					}
					
					if(form.content.value==''){
						prompting('请填写推送文案！');
						return false;
					}

					return true;
				}
	</script>			
</body>
</html>